<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title><?php echo $this->_siteConfig->name;?></title>
    <link type="image/x-icon" href="<?php echo IUrl::creatUrl("")."favicon.ico";?>" rel="icon">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="apple-touch-icon-precomposed" href="<?php echo $this->getWebSkinPath()."image/logo.gif";?>">
    <script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/jquery/jquery-1.12.4.min.js"></script> <script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/form/form.js"></script> <script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/autovalidate/validate.js"></script><link rel="stylesheet" type="text/css" href="/git/micarshop/runtime/_systemjs/autovalidate/style.css" /> <script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/artdialog/artDialog.js"></script><script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/artdialog/plugins/iframeTools.js"></script><link rel="stylesheet" type="text/css" href="/git/micarshop/runtime/_systemjs/artdialog/skins/aero.css" /> <script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/artTemplate/artTemplate.js"></script><script type="text/javascript" charset="UTF-8" src="/git/micarshop/runtime/_systemjs/artTemplate/artTemplate-plugin.js"></script>
    <script src="<?php echo $this->getWebViewPath()."javascript/common.js";?>"></script>
    <script src='<?php echo $this->getWebViewPath()."javascript/site.js";?>'></script>
    <link rel="stylesheet" href="<?php echo $this->getWebSkinPath()."style/style.css";?>">
</head>

<body>
    <!-- 顶部通栏 -->
    <header class="header_box">
        <div class="header">
            <?php if(IWeb::$app->getController()->getId() == 'site' && IWeb::$app->getController()->getAction()->getId() == 'index'){?>
            <div class="header_home"><i class="icon-home"></i></div>
            <?php }else{?>
            <div class="header_back" onclick="window.history.back();"><i class="icon-chevron-left"></i></div>
            <?php }?>
            <h1 id="page_title" class="page_title"><?php echo $this->_siteConfig->name;?></h1>
        
            <!-- <div class="header_so_btn" onclick="$('.header_search').toggle();"><i class="icon-search"></i></div> -->
            <div class="header_so_btn" onclick="jump_url()"><i class="icon-search"></i></div>
        
        </div>
    </header>
    <!-- 顶部搜索 -->
    <section class="header_search">
        <form method='get' action="<?php echo IUrl::creatUrl("/");?>">
            <input type='hidden' name='controller' value='site'>
            <input type='hidden' name='action' value='search_list'>
            <input class="keywords" type="text" name='word' autocomplete="off" placeholder="请输入关键词...">
            <input class="submit" type="submit" value="搜索">
        </form>
    </section>
    <!-- 引入内页 -->
    <section class="viewport">
        <div id="pageInfo" data-title="商品搜索"></div>
<style>
.s_type{
	color: red;
	text-align: right;
	line-height: 0.3rem;
}
</style>

<?php 
	//$openId = 'o7WLlwS6UmVJ2nPgYrqBf7eP7EFg';
	$openId = ISession::get('wechat_openid');
?>

<?php if($resultData){?>
<aside class="goods_sort">
    <?php foreach(search_goods::getOrderType() as $key => $item){?>
    <span class="sort_btn" onclick="gourl('<?php echo search_goods::searchUrl(array('order','by'),array($key,search_goods::getOrderBy($key)));?>')"><?php echo isset($item)?$item:"";?></span>
    <?php }?>
</aside>
<section class="goods_list">
    <ul>
        <?php foreach($resultData as $key => $item){?>
        <li>
            <a href="<?php echo IUrl::creatUrl("/site/products/id/".$item['id']."");?>">
                <i class="photo"><img class="goods_photo" src="<?php echo IUrl::creatUrl("/pic/thumb/img/".$item['img']."/w/200/h/200");?>" alt="<?php echo isset($item['name'])?$item['name']:"";?>"></i>
                <h3 class="name"><strong><?php echo isset($item['name'])?$item['name']:"";?></strong></h3>
                <?php if($item['good_type'] == 2){?>
					<h5 class="s_type">到店</h5>
				<?php }?>
				
                <del class="old_price">￥<?php echo isset($item['market_price'])?$item['market_price']:"";?></del>
                <em class="price">￥<?php echo isset($item['sell_price'])?$item['sell_price']:"";?></em>
                 <?php 
                	echo $item['xiaoshouticheng'] ;
                	$tichen= 23 *  $item['xiaoshouticheng'] / 100;
					$tichen = substr(sprintf("%.3f",$tichen),0,-1);
                ?>
                <?php $query = new IQuery("seller");$query->where = "wecharbang = '$openId'";$items = $query->find(); foreach($items as $key => $item){?>	
                
               
                <span style="display: block;margin-top: 10px;">销售提成：<span style="color: red">￥<?php echo isset($tichen)?$tichen:"";?></span></span>
            	<?php }?>
            </a>
        </li>
        <?php }?>
    </ul>
</section>
<?php echo $goodsObj->getPageBar();?>
<?php }else{?>
<section class="nodata">搜索结果为零</section>
<?php }?>





    </section>
    <!-- 会员登陆与否显示不同内容 -->
    <?php if($this->user){?>
    <?php }else{?>
    <!-- 
    <section class="footer_login">
        <a class="login" href="<?php echo IUrl::creatUrl("simple/login");?>">登录</a>
        <a class="reg" href="<?php echo IUrl::creatUrl("simple/reg");?>">注册</a>
    </section> -->
    <?php }?>
    <!--底部菜单-->
    <nav class="footer_nav">
        <ul>
            <li class="nav_home"><a href="<?php echo IUrl::creatUrl("site");?>"><i class="icon-home"></i><span>首页</span></a></li>
            <li class="nav_cart"><a href="<?php echo IUrl::creatUrl("simple/cart");?>"><i class="icon-shopping-cart"></i><span>购物车</span></a></li>
            <li class="nav_user"><a href="<?php echo IUrl::creatUrl("/ucenter/index");?>"><i class="icon-user"></i><span>个人中心</span></a></li>
            <li class="nav_map"><a href="<?php echo IUrl::creatUrl("site/sitemap");?>"><i class="icon-reorder"></i><span>分类</span></a></li>
        </ul>
    </nav>
    <script src='<?php echo $this->getWebViewPath()."javascript/mobile.js";?>'></script>
</body>

</html>

<script type="text/javascript">

var ex = "http://"+window.location.host+"/";
function jump_url(){
	
	//window.location.href = ex+"site/goseachpage";
	window.location.href = ex+"git/micarshop/site/goseachpage";
	
}

</script>

